﻿
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="__STATIC__/layui/css/admin.css" media="all">
  <link rel="stylesheet" href="__STATIC__/layui/css/template.css" media="all">
 <style>
.layui-icon-cart:hover{color:red;}
</style>


	<div class="layui-fluid layadmin-homepage-fluid">
		<div class="layui-row layui-col-space8">
			<div class="layui-col-md12">
				<div class="layui-fluid layadmin-homepage-content">
					<div class="layui-row layui-col-space20 layadmin-homepage-list-imgtxt">
						<!-- ++++++++++++++ -->
						<div class="layui-col-md12" > 

{if count(model_config())>1}
<!--只有1个模型的话，就没必要显示出来了-->
<div class="layui-row layui-fluid  layui-col-space40">所属模型：
{volist name=":model_config()" id="rs"}
    <a href="{:urls('index',['mid'=>$rs.id])}" class="layui-btn {if $rs.id==$mid}layui-btn-normal{else /}layui-btn-primary{/if}">{$rs.title}</a> 
{/volist}
</div>
{/if}

 <form class="layui-form" action="" method="get">   
  <div class="layui-form-item">
    <label class="layui-form-label">关键字</label>
    <div class="layui-input-inline">
      <input type="text" name="keyword" lay-verify="required" placeholder="请输入关键字" value="{:input('keyword')}" class="layui-input">
    </div>
    <!--<div class="layui-form-mid layui-word-aux">请输入要搜索的关键字</div>-->	
  </div>
	<div class="layui-input-block">
	<input type="radio" name="ruletype" value="0" title="模糊匹配:*xx*" {if empty(input('ruletype'))}checked{/if}>
	<input type="radio" name="ruletype" value="1" title="后面模糊:xx*" {if input('ruletype')==1}checked{/if}>
	<input type="radio" name="ruletype" value="2" title="前面模糊:*xx" {if input('ruletype')==2}checked{/if}>
	<input type="radio" name="ruletype" value="3" title="唯一匹配:=" {if input('ruletype')==3}checked{/if}>
	</div>
	

  <div class="layui-form-item">
    <label class="layui-form-label">搜索字段</label>
    <div class="layui-input-block">
{volist name="f_array" id="rs"}
	{if (($rs.ifsearch&&in_array($rs.type,['text','textarea']))||in_array($rs.name,['title','content']))}
      <input type="radio" name="type" value="{$rs.name}" title="{$rs.title}" {if (($i==1&&empty(input('type')))||input('type')==$rs.name)}checked{/if}>
	{/if}	
{/volist}
	<input type="radio" name="type" value="uid" title="用户UID" {if (input('type')=='uid')}checked{/if}>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">所属栏目</label>
      <div class="layui-input-inline">
        <select name="fid">
		<option value="0">请选择...</option>
{volist name=":sort_config()" id="rs"}
		{if $rs.mid==$mid}
          <option value="{$rs.id}" {if (input('fid')==$rs.id)}selected{/if}>{$rs.title_display}</option>
		{/if}
{/volist}
        </select>
      </div>
    </div>
  </div>

{volist name="f_array" id="rs"}
	{if ($rs.ifsearch&&in_array($rs.type,['radio','select']))}
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">{$rs.title}</label>
      <div class="layui-input-inline">
        <select name="{$rs.name}">
          <option value="">请选择...</option>
		  {volist name=':str_array($rs.options,"\n")' id="vs"}
          <option value="{$key}" {if (input($rs.name)==$key)}selected{/if}>{$vs}</option>
          {/volist}
        </select>
      </div>
    </div>
  </div>
	{/if}
{/volist}

{volist name="f_array" id="rs"}
	{if ($rs.ifsearch&&in_array($rs.type,['checkbox']))}
  <div class="layui-form-item">
    <label class="layui-form-label">{$rs.title}</label>
    <div class="layui-input-block">      
      {volist name=':str_array($rs.options,"\n")' id="vs"}
          <input type="checkbox" name="{$rs.name}[]" value="{$key}" title="{$vs}" {if in_array($key,input()["$rs[name]"])}checked{/if}>
       {/volist}
    </div>
  </div>
	{/if}
{/volist}
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="demo1">提交搜索</button>
    </div>
  </div>
</form>


 {if $listdb!==null&&empty($listdb)}
	没有找到你想的内容！
 {elseif $listdb /}
			{volist name="listdb" id="rs"}
			<div class="panel-body layadmin-homepage-shadow">
                <a href="javascript:;" class="media-left">
                  <img onerror="this.src='__STATIC__/images/nobody.gif'" src="{$rs.user_icon}" height="46px" width="46px">
                </a>
                <div class="media-body">
                  <div class="pad-btm" style="padding-bottom:2px;">
                    <p class="fontColor">标题: <a target="_blank" href="{$rs.url}"><span>{$rs.title}</span></a></p>
                    <p class="min-font">
					  <span> 
                        <a href="javascript:;" style="color:#666;" class="layui-icon layui-icon-log"></a> -
                        <a href="javascript:;" style="color:#666;" target="_blank">{$rs.username}</a> 时间  
                        <a href="javascript:;" style="color:#666;">{:format_time($rs.create_time)}</a>
                      </span>
                    </p>         
                  </div>
                  <p>{:get_word($rs.content?:del_html($content=fun('bbs@getContents',$rs.id)),400)}</p>
				  <div class="morepic">
						  	{volist name=":getArray($pics=$rs.picurls?:fun('content@get_images',$content))" id="vs"}
						  		{if $i<4}<a href="{$rs.url}"><img style="{if count($pics)==1}max-width:600px;{else /}height:100px;{/if}margin:5px 5px 15px 5px;" src="{$vs.picurl}"></a>{/if}
							{/volist}
				  </div>                                       
                </div>
              </div>
			{/volist}
			{$pages}
{/if}


						</div>
						
					</div>
				</div>
			</div>
		</div>
	</div>
 

<style type="text/css">
.topUpCont{
	position: fixed;
	width: 80px;
	border: #DDD solid 1px;
	background: #FFF;
	z-index: 10000;
	right:10px;
	bottom: 10px;
	border-radius: 5px;
	text-align: center;
	padding: 10px 0px;
	line-height: 20px;
	cursor: pointer;
	color: #999;
	display: none;
}
.topUpCont i{
	font-size:20px
}
.topUpCont:hover{
	border:#F60 solid 1px;
	background: #F90;
	color: #FFF;
}
</style>
<div class="topUpCont">
    <ul>
    	<ol><i class="fa fa-angle-double-up"></i></ol>
        <li>回到顶部</li>
    </ul>
</div>


 

<script src="/public/static/layui/layui.js"></script>  
<script type="text/javascript">
layui.use(['form','element'], function(){
  var form = layui.form;
  var element = layui.element;
});
</script>  

